<?php
$grades = [
    '一号裁判'=>98.2,
    '二号裁判'=>97.5,
    '三号裁判'=>91,
    '四号裁判'=>89,
    '五号裁判'=>99,
    '六号裁判'=>98.5,
    '七号裁判'=>96.6,
    '八号裁判'=>93.4,
];
$sum=array_sum($grades);
asort($grades);
$g=array_values($grades);
$go=($sum-$g[0]-$g[count($g)-1])/(count($g)-2);
$goo=round($go,2);
$ks=array_keys($grades);
print_r($ks);
echo "总分为",$sum,"\n";
echo"打出最低分的裁判为",$ks[0],"打分为",$g[0],"\n";
echo"打出最高分的裁判为",$ks[count($g)-1],"打分为",$g[count($g)-1],"\n";
echo"去掉一个最高分和最低分后的平均分为",$goo;